import org.apache.http.HttpHost;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient;

import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.indices.CreateIndexRequest;
import org.elasticsearch.common.xcontent.XContentType;

import java.io.IOException;

public class T {
    public RestHighLevelClient client=new RestHighLevelClient(RestClient.
            builder(HttpHost.create("192.1.1.10")));


    public void f() throws IOException {
        CreateIndexRequest request=new CreateIndexRequest("hotel");


        request.source("mapping", XContentType.JSON);





        client.indices().create(request, RequestOptions.DEFAULT);
    }
}
